package no.ntnu.fp.controllers;

import java.util.ArrayList;

import no.ntnu.fp.console.Options;
import no.ntnu.fp.model.Meeting;

public class MeetingController extends AbstractController {
	Meeting meeting;
	Options options;
	
	public MeetingController(Options options) {
		this.options = options;
	}
	
		
	public void createMeeting(ArrayList<String> users, String leader, String date, String start, String end, String place, String description, boolean hasBookedRoom) {
		meeting = new Meeting(users, leader, date, start, end, place, description, hasBookedRoom);

		String[] choices = {"Ja", "Nei"};

		int input = Options.showChoices(choices, "Vil du lagre denne moteinnkallingen i databasen?", "Meny");

		if (input == 0) {
			meeting.save();
		}
		options.messageDialog(meeting.toString());
	}
}
